home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 May: Tool Chest / Dev.CD May 97 TC.toast / Sample Code / Processes / ProcDoggie 2.1b1 / ProcDoggie.r < prev    next >
Encoding:
Text File  |  1997-03-20  |  8.8 KB  |  540 lines  |  [TEXT/CWIE]

  1. /*------------------------------------------------------------------------------
  2.     File:        ProcDoggie.r
  3.  
  4.     Contains:    Resource definitions for the ProcDoggie application.
  5.  
  6.     Written by:    Forrest Tanaka
  7.  
  8.     Copyright:    © 1988-1997 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.     You may incorporate this sample code into your applications without
  13.     restriction, though the sample code has been provided "AS IS" and the
  14.     responsibility for its operation is 100% yours.  However, what you are
  15.     not permitted to do is to redistribute the source as "DSC Sample Code"
  16.     after having made changes. If you're going to re-distribute the source,
  17.     we require that you make it clear in the source that the code was
  18.     descended from Apple Sample Code, but that you've made changes.
  19.  *------------------------------------------------------------------------------
  20.  *
  21.  *    For the moment, the resource definitions are actually inside the ResEdit
  22.  *    document called ProcDoggie.rsrc.  This project simply includes the resources
  23.  *    in that file
  24.  *
  25.  *    That's true for all except 'DITL' ID=129, which is defined in a very
  26.  *    weird way using a custom template.  This file defines that template
  27.  *  and the resource using it.  For details about why it's done this way,
  28.  *  see the comment for InstallDialogItems in UDialogUtils.p.  I would just
  29.  *  like to point out that it's not my fault -- Quinn 7 Mar 1997
  30.  *
  31.  *----------------------------------------------------------------------------*/
  32.  
  33. #include "SysTypes.r"
  34. #include "Types.r"
  35.  
  36. type 'DITL' {
  37.     integer = $$CountOf(DITLarray) - 1;
  38.     wide array DITLarray {
  39.         byte; /* Font index */
  40.         byte textPlain=0,textBold=1,textItalic=2,textUnderline=4,textOutline=8,textShadow=16,textCondense=32,textExtend=64; /* Text item style */
  41.         byte; /* Font size */
  42.         byte justLeft=-2,justRight=-1,justDefault=0,justCenter=1; /* Justification */
  43.         rect;                                            /* Item bounds            */
  44.                 switch {
  45.  
  46.                 case HelpItem:                                    /* Help Mgr type item */
  47.                         boolean         enabled,disabled;        /* Enable flag            */
  48.                         key bitstring[7] = 1;                    /* this is a new type = 1 */
  49.                         
  50.                         switch {
  51.                             case HMScanhdlg:
  52.                                 byte = 4;                        /* sizeola                */
  53.                                 key int = 1;                    /* key value             */
  54.                                 integer;                        /* resource ID            */
  55.                                 
  56.                             case HMScanhrct:
  57.                                 byte = 4;                        /* sizeola                */
  58.                                 key int = 2;                    /* key value             */
  59.                                 integer;                        /* resource ID            */
  60.                                 
  61.                             case HMScanAppendhdlg:
  62.                                 byte = 6;                        /* sizeola                */
  63.                                 key int = 8;                    /* key value             */
  64.                                 integer;                        /* resource ID            */
  65.                                 integer;                        /* offset (zero based)    */
  66.                         };
  67.                 case Button:
  68.                         boolean         enabled,disabled;        /* Enable flag            */
  69.                         key bitstring[7] = 4;
  70.                         pstring;                                /* Title                */
  71.  
  72.                 case CheckBox:
  73.                         boolean         enabled,disabled;        /* Enable flag            */
  74.                         key bitstring[7] = 5;
  75.                         pstring;                                /* Title                */
  76.  
  77.                 case RadioButton:
  78.                         boolean         enabled,disabled;        /* Enable flag            */
  79.                         key bitstring[7] = 6;
  80.                         pstring;                                /* Title                */
  81.  
  82.                 case Control:
  83.                         boolean         enabled,disabled;        /* Enable flag            */
  84.                         key bitstring[7] = 7;
  85.                         byte = 2;
  86.                         integer;                                /* 'CTRL' ID            */
  87.  
  88.                 case StaticText:
  89.                         boolean         enabled,disabled;        /* Enable flag            */
  90.                         key bitstring[7] = 8;
  91.                         pstring;                                /* Text                 */
  92.  
  93.                 case EditText:
  94.                         boolean         enabled,disabled;        /* Enable flag            */
  95.                         key bitstring[7] = 16;
  96.                         pstring;                                /* Text                 */
  97.  
  98.                 case Icon:
  99.                         boolean         enabled,disabled;        /* Enable flag            */
  100.                         key bitstring[7] = 32;
  101.                         byte = 2;
  102.                         integer;                                /* 'ICON' ID            */
  103.  
  104.                 case Picture:
  105.                         boolean         enabled,disabled;        /* Enable flag            */
  106.                         key bitstring[7] = 64;
  107.                         byte = 2;
  108.                         integer;                                /* 'PICT' ID            */
  109.  
  110.                 case UserItem:
  111.                         boolean         enabled,disabled;        /* Enable flag            */
  112.                         key bitstring[7] = 0;
  113.                         byte = 0;
  114.                 };
  115.                 align word;
  116.         };
  117. };
  118.  
  119. resource 'DITL' (129, purgeable) {
  120.     {    /* array DITLarray: 36 elements */
  121.         /* [1] */
  122.         0,
  123.         0,
  124.         0,
  125.         0,
  126.         {10, 10, 42, 42},
  127.         UserItem {
  128.             disabled
  129.         },
  130.         /* [2] */
  131.         0,
  132.         0,
  133.         0,
  134.         0,
  135.         {10, 46, 30, 174},
  136.         StaticText {
  137.             disabled,
  138.             "Process Name"
  139.         },
  140.         /* [3] */
  141.         1,
  142.         textBold,
  143.         9,
  144.         justDefault,
  145.         {32, 46, 46, 144},
  146.         StaticText {
  147.             disabled,
  148.             "Application"
  149.         },
  150.         /* [4] */
  151.         1,
  152.         textBold,
  153.         9,
  154.         justDefault,
  155.         {19, 206, 33, 286},
  156.         StaticText {
  157.             disabled,
  158.             "Total Size:"
  159.         },
  160.         /* [5] */
  161.         1,
  162.         textBold,
  163.         9,
  164.         justDefault,
  165.         {32, 206, 46, 286},
  166.         StaticText {
  167.             disabled,
  168.             "Free Memory:"
  169.         },
  170.         /* [6] */
  171.         1,
  172.         textPlain,
  173.         9,
  174.         justRight,
  175.         {19, 285, 33, 325},
  176.         StaticText {
  177.             disabled,
  178.             ""
  179.         },
  180.         /* [7] */
  181.         1,
  182.         textPlain,
  183.         9,
  184.         justRight,
  185.         {32, 285, 46, 325},
  186.         StaticText {
  187.             disabled,
  188.             ""
  189.         },
  190.         /* [8] */
  191.         0,
  192.         0,
  193.         0,
  194.         0,
  195.         {10, 340, 42, 372},
  196.         UserItem {
  197.             disabled
  198.         },
  199.         /* [9] */
  200.         0,
  201.         0,
  202.         0,
  203.         0,
  204.         {52, 10, 52, 372},
  205.         UserItem {
  206.             disabled
  207.         },
  208.         /* [10] */
  209.         1,
  210.         textBold,
  211.         9,
  212.         justDefault,
  213.         {60, 10, 74, 62},
  214.         StaticText {
  215.             disabled,
  216.             "Type:"
  217.         },
  218.         /* [11] */
  219.         1,
  220.         textBold,
  221.         9,
  222.         justDefault,
  223.         {73, 10, 87, 62},
  224.         StaticText {
  225.             disabled,
  226.             "Creator:"
  227.         },
  228.         /* [12] */
  229.         2,
  230.         textPlain,
  231.         9,
  232.         justDefault,
  233.         {61, 61, 75, 136},
  234.         StaticText {
  235.             disabled,
  236.             "TYPE"
  237.         },
  238.         /* [13] */
  239.         2,
  240.         textPlain,
  241.         9,
  242.         justDefault,
  243.         {74, 61, 88, 136},
  244.         StaticText {
  245.             disabled,
  246.             "CREA"
  247.         },
  248.         /* [14] */
  249.         0,
  250.         0,
  251.         0,
  252.         0,
  253.         {92, 10, 92, 372},
  254.         UserItem {
  255.             disabled
  256.         },
  257.         /* [15] */
  258.         1,
  259.         textPlain,
  260.         9,
  261.         justDefault,
  262.         {105, 48, 119, 62},
  263.         StaticText {
  264.             disabled,
  265.             "√"
  266.         },
  267.         /* [16] */
  268.         1,
  269.         textPlain,
  270.         9,
  271.         justDefault,
  272.         {118, 48, 132, 62},
  273.         StaticText {
  274.             disabled,
  275.             "√"
  276.         },
  277.         /* [17] */
  278.         1,
  279.         textPlain,
  280.         9,
  281.         justDefault,
  282.         {131, 48, 145, 62},
  283.         StaticText {
  284.             disabled,
  285.             "√"
  286.         },
  287.         /* [18] */
  288.         1,
  289.         textPlain,
  290.         9,
  291.         justDefault,
  292.         {144, 48, 158, 62},
  293.         StaticText {
  294.             disabled,
  295.             "√"
  296.         },
  297.         /* [19] */
  298.         1,
  299.         textPlain,
  300.         9,
  301.         justDefault,
  302.         {157, 48, 171, 62},
  303.         StaticText {
  304.             disabled,
  305.             "√"
  306.         },
  307.         /* [20] */
  308.         1,
  309.         textPlain,
  310.         9,
  311.         justDefault,
  312.         {170, 48, 184, 62},
  313.         StaticText {
  314.             disabled,
  315.             "√"
  316.         },
  317.         /* [21] */
  318.         1,
  319.         textPlain,
  320.         9,
  321.         justDefault,
  322.         {183, 48, 197, 62},
  323.         StaticText {
  324.             disabled,
  325.             "√"
  326.         },
  327.         /* [22] */
  328.         1,
  329.         textPlain,
  330.         9,
  331.         justDefault,
  332.         {196, 48, 210, 62},
  333.         StaticText {
  334.             disabled,
  335.             "√"
  336.         },
  337.         /* [23] */
  338.         1,
  339.         textPlain,
  340.         9,
  341.         justDefault,
  342.         {209, 48, 223, 62},
  343.         StaticText {
  344.             disabled,
  345.             "√"
  346.         },
  347.         /* [24] */
  348.         1,
  349.         textPlain,
  350.         9,
  351.         justDefault,
  352.         {222, 48, 236, 62},
  353.         StaticText {
  354.             disabled,
  355.             "√"
  356.         },
  357.         /* [25] */
  358.         1,
  359.         textPlain,
  360.         9,
  361.         justDefault,
  362.         {235, 48, 249, 62},
  363.         StaticText {
  364.             disabled,
  365.             "√"
  366.         },
  367.         /* [26] */
  368.         1,
  369.         textPlain,
  370.         9,
  371.         justDefault,
  372.         {248, 48, 262, 62},
  373.         StaticText {
  374.             disabled,
  375.             "√"
  376.         },
  377.         /* [27] */
  378.         1,
  379.         textPlain,
  380.         9,
  381.         justDefault,
  382.         {261, 48, 275, 62},
  383.         StaticText {
  384.             disabled,
  385.             "√"
  386.         },
  387.         /* [28] */
  388.         1,
  389.         textBold,
  390.         9,
  391.         justDefault,
  392.         {105, 61, 119, 341},
  393.         StaticText {
  394.             disabled,
  395.             "Accepts suspend/resume events"
  396.         },
  397.         /* [29] */
  398.         1,
  399.         textBold,
  400.         9,
  401.         justDefault,
  402.         {118, 61, 132, 341},
  403.         StaticText {
  404.             disabled,
  405.             "Handles window activations on major switches"
  406.         },
  407.         /* [30] */
  408.         1,
  409.         textBold,
  410.         9,
  411.         justDefault,
  412.         {131, 61, 145, 341},
  413.         StaticText {
  414.             disabled,
  415.             "Reacts to mouse clicks that cause major "
  416.             "switches"
  417.         },
  418.         /* [31] */
  419.         1,
  420.         textBold,
  421.         9,
  422.         justDefault,
  423.         {144, 61, 158, 341},
  424.         StaticText {
  425.             disabled,
  426.             "Accepts Application-Died events"
  427.         },
  428.         /* [32] */
  429.         1,
  430.         textBold,
  431.         9,
  432.         justDefault,
  433.         {157, 61, 171, 341},
  434.         StaticText {
  435.             disabled,
  436.             "Stationery-aware"
  437.         },
  438.         /* [33] */
  439.         1,
  440.         textBold,
  441.         9,
  442.         justDefault,
  443.         {170, 61, 184, 341},
  444.         StaticText {
  445.             disabled,
  446.             "Can work in background"
  447.         },
  448.         /* [34] */
  449.         1,
  450.         textBold,
  451.         9,
  452.         justDefault,
  453.         {183, 61, 197, 341},
  454.         StaticText {
  455.             disabled,
  456.             "Only works in background"
  457.         },
  458.         /* [35] */
  459.         1,
  460.         textBold,
  461.         9,
  462.         justDefault,
  463.         {196, 61, 210, 341},
  464.         StaticText {
  465.             disabled,
  466.             "High-level event aware"
  467.         },
  468.         /* [36] */
  469.         1,
  470.         textBold,
  471.         9,
  472.         justDefault,
  473.         {209, 61, 223, 341},
  474.         StaticText {
  475.             disabled,
  476.             "Accepts remote high-level events"
  477.         },
  478.         /* [37] */
  479.         1,
  480.         textBold,
  481.         9,
  482.         justDefault,
  483.         {222, 61, 236, 341},
  484.         StaticText {
  485.             disabled,
  486.             "Allows multi-user launches"
  487.         },
  488.         /* [38] */
  489.         1,
  490.         textBold,
  491.         9,
  492.         justDefault,
  493.         {235, 61, 249, 341},
  494.         StaticText {
  495.             disabled,
  496.             "32-bit clean"
  497.         },
  498.         /* [39] */
  499.         1,
  500.         textBold,
  501.         9,
  502.         justDefault,
  503.         {248, 61, 262, 341},
  504.         StaticText {
  505.             disabled,
  506.             "Use TextEdit Services"
  507.         },
  508.         /* [40] */
  509.         1,
  510.         textBold,
  511.         9,
  512.         justDefault,
  513.         {261, 61, 275, 341},
  514.         StaticText {
  515.             disabled,
  516.             "Display Manager Aware"
  517.         },
  518.         /* [41] */
  519.         1,
  520.         textPlain,
  521.         9,
  522.         justLeft,
  523.         {19, 325, 33, 335},
  524.         StaticText {
  525.             disabled,
  526.             "K"
  527.         },
  528.         /* [42] */
  529.         1,
  530.         textPlain,
  531.         9,
  532.         justLeft,
  533.         {32, 325, 46, 335},
  534.         StaticText {
  535.             disabled,
  536.             "K"
  537.         }
  538.     }
  539. };
  540.